package com.rd.student.jiaji.class3.xumingze;

import java.util.LinkedList;
import java.util.Scanner;

public class AddUtils {

    public static LinkedList addd(LinkedList list) {

        Scanner input = new Scanner(System.in);
        System.out.println("请依次输入学生信息");
        Student students = new Student();
        System.out.println("输入名字");
        String name = input.next();
        students.name = name;

        System.out.println("输入班级");
        String cls = input.next();
        students.cls = cls;
        System.out.println("输入专业");
        String major = input.next();
        students.major = major;
        System.out.println("输入年龄");
        int age = input.nextInt();
        students.age = age;

        System.out.println("输入描述");
        String desc = input.next();
        students.desc = desc;
        System.out.println("输入代码量");
        String codeNum = input.next();
        students.codeNum = codeNum;
        list.add(students);


        System.out.println(list);
        return list;
        }

}
